package com.sea.physical.mapper;

import com.sea.physical.entity.CreateDistributePlan;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 分配计划
 * @author 陈鸿飞
 */
public interface CreateDistributePlanMapper {
    /**
     * 查询表头信息
     * @param createId
     * @return
     */
    CreateDistributePlan findByCreateId(Integer createId);

    /**
     * 创建分配计划
     * @param createDistributePlan
     * @return
     */
    int insert(CreateDistributePlan createDistributePlan);

    /**
     * 条件查询
     * @param createDistributePlan
     * @return
     */
    List<CreateDistributePlan> findByCnd(CreateDistributePlan createDistributePlan);
    /**
     * 更新数量
     * @param createDistributePlan
     * @return
     */
    int update(CreateDistributePlan createDistributePlan);


    /**
     * 更新分配表头明细
     * @param createId
     * @return
     */
    int updateTotal(Integer createId);

    Integer updateBoxNumberByCreateId(@Param("boxNumber")Integer boxNumber, @Param("id")Integer id);

}
